﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace MVCExtension
{
    /// <summary>
    /// Action级别的日志记录
    /// 使用方法，需要启用日志记录的Action添加[ExceptionLog]Attribute
    /// </summary>
    public class ExceptionLogAttribute : HandleErrorAttribute
    {
        public override void OnException(ExceptionContext Context)
        {
            base.OnException(Context);

            //if (!Context.ExceptionHandled)
            //    return;
            MVCExtension.FrameWork.Logger.Debug(Context.Exception);

        }
    }
}
